//
//  SearchModaViewController.m
//  CarTown
//
//  Created by xionghao on 15/9/18.
//  Copyright (c) 2015年 熊浩. All rights reserved.
//

#import "SearchModaViewController.h"
#import "SearchBarView.h"
@interface SearchModaViewController ()
@property (nonatomic,strong) SearchBarView *search;
@end

@implementation SearchModaViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    SearchBarView *view=[[SearchBarView alloc] init];
    view.frame=self.seachframe;
    view.y=self.seachframe.origin.y-20;
    view.height=44;
    [self.view addSubview:view];
     self.search=view;
   
    NSLog(@"%f",view.height);
    
    // Do any additional setup after loading the view from its nib.
}

-(void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    [UIView animateWithDuration:0.5 animations:^{
        self.search.y=20;
        self.search.x=0;
        self.search.width=XHScreenwidth;
        
        
    }];
}

-(UIStatusBarStyle)preferredStatusBarStyle{
    return UIStatusBarStyleDefault;
}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
